package com.eqxiu.ieditor.api.order;

import com.eqxiu.ieditor.dto.ItemDTO;
import com.eqxiu.ieditor.dto.OrderDTO;

import java.util.List;
import java.util.Optional;

/**
 * 
 * @description //TODO 设计说明
 * @author ranger
 * @date May 26, 2017
 */
public interface IOrderItemServiceApi {

	/**
	 * 
	 * @description 创建订单
	 * @author ranger
	 * @date May 27, 2017
	 * @modified by xxx 修改说明
	 * @param order
	 */
	public void createItem(ItemDTO order);

	/**
	 * 
	 * @description 根据主键查询订单
	 * @author ranger
	 * @date Oct 27, 2016
	 * @modified by xxx 修改说明
	 * @param id
	 * @return
	 */
	Optional<ItemDTO> selectByPrimaryKey(Integer id);


	int countByItemType(String userId, String code, Integer itemType);

	/**
	 * @param dto
	 *            create order interface
	 */
	public void createOrderItem(OrderDTO dto);


	public OrderDTO getOrderItemById(Integer orderId);

}
